package com.ruoyi.driver.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.BankAccountsMapper;
import com.ruoyi.driver.domain.BankAccounts;
import com.ruoyi.driver.service.IBankAccountsService;

/**
 * 银行账号Service业务层处理
 * 
 * @author yyj
 * @date 2025-08-17
 */
@Service
public class BankAccountsServiceImpl implements IBankAccountsService 
{
    @Autowired
    private BankAccountsMapper bankAccountsMapper;

    @Autowired
    ElasticsearchRestTemplate elasticsearchRestTemplate;

    @Autowired
    KafkaTemplate kafkaTemplate;

    /**
     * 查询银行账号
     * 
     * @param id 银行账号主键
     * @return 银行账号
     */
    @Override
    public BankAccounts selectBankAccountsById(Long id)
    {
        return bankAccountsMapper.selectBankAccountsById(id);
    }

    /**
     * 查询银行账号列表
     * 
     * @param bankAccounts 银行账号
     * @return 银行账号
     */
    @Override
    public List<BankAccounts> selectBankAccountsList(BankAccounts bankAccounts)
    {
        return bankAccountsMapper.selectBankAccountsList(bankAccounts);
    }

    /**
     * 新增银行账号
     * 
     * @param bankAccounts 银行账号
     * @return 结果
     */
    @Override
    public int insertBankAccounts(BankAccounts bankAccounts)
    {
        return bankAccountsMapper.insertBankAccounts(bankAccounts);
    }

    /**
     * 修改银行账号
     * 
     * @param bankAccounts 银行账号
     * @return 结果
     */
    @Override
    public int updateBankAccounts(BankAccounts bankAccounts)
    {
        return bankAccountsMapper.updateBankAccounts(bankAccounts);
    }

    /**
     * 批量删除银行账号
     * 
     * @param ids 需要删除的银行账号主键
     * @return 结果
     */
    @Override
    public int deleteBankAccountsByIds(Long[] ids)
    {
        return bankAccountsMapper.deleteBankAccountsByIds(ids);
    }

    /**
     * 删除银行账号信息
     * 
     * @param id 银行账号主键
     * @return 结果
     */
    @Override
    public int deleteBankAccountsById(Long id)
    {
        return bankAccountsMapper.deleteBankAccountsById(id);
    }
}
